package com.arpa.wms.domain.entity;

import com.arpa.wms.domain.vo.InboundItemVO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 入库单
 * </p>
 *
 * @author LEO
 * @since 2020-08-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("wms_inbound")
@ApiModel(value="Inbound对象", description="入库单")
public class Inbound extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "入库单号")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "仓库")
    @TableField("warehouse_code")
    private String warehouseCode;

    @ApiModelProperty(value = "入驻商")
    @TableField("shipment_code")
    private String shipmentCode;

    @ApiModelProperty(value = "入驻商")
    @TableField("shipment_name")
    private String shipmentName;

    @ApiModelProperty(value = "所属机构Code")
    @TableField("group_code")
    private String groupCode;

    @ApiModelProperty(value = "来源单号")
    @TableField("source_code")
    private String sourceCode;

    @ApiModelProperty(value = "单据类型")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "订单日期")
    @TableField("gmt_order")
    private LocalDateTime gmtOrder;

    @ApiModelProperty(value = "计划数量")
    @TableField("plan_quantity")
    private BigDecimal planQuantity;

    @ApiModelProperty(value = "入库数量")
    @TableField("inbound_quantity")
    private BigDecimal inboundQuantity;

    @ApiModelProperty(value = "状态")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;


    @ApiModelProperty(value = "明细列表")
    @TableField(exist = false)
    private List<InboundItemVO> inboundItemVOList;

    @ApiModelProperty(value = "是否oms下发的；0：否；1：是；用于后期判断反填oms数据")
    @TableField("is_oms_order")
    private Integer isOmsOrder;

    @ApiModelProperty(value = "上架单号")
    @TableField(exist = false)
    private String putawayCode;

}
